package com.weiqiao.mall.repository;

import com.weiqiao.base.dao.IBaseMongoDao;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author PENGLIWEI
 * @createDate 2019-10-25
 */
public interface IVarietyRepository extends IBaseMongoDao {
    List<String> selectList(Bson doc, Pageable pageable);

    List<String> selectListByFilter(Bson filter);

    List<String> selectCompanyList(Bson filter);

    boolean saveVariety(String json);

    int getOrderLogCount(int company_id, Bson filter);

    boolean deleteById(Bson filter, Document doc, boolean bool);

    String findVarietyFilter(Bson bson);

    boolean updateVariety(Bson filter, Document doc, boolean bool);

    /**
     * 根据查询条件和排序规则查询宝贝分类数据
     *
     * @param filter
     * @param sortFilter
     * @return
     */
    List<String> getVarietyListBySort(Bson filter, Bson sortFilter);

}
